.class public Lcom/glympse/android/glympse/DlgSettings$SettingAdapter;
.super Landroid/widget/ArrayAdapter;
.source "DlgSettings.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/DlgSettings;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "SettingAdapter"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/widget/ArrayAdapter",
        "<",
        "Lcom/glympse/android/glympse/DlgSettings$Setting;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/glympse/android/glympse/DlgSettings;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/DlgSettings;Landroid/content/Context;Ljava/util/ArrayList;)V
    .locals 1
    .parameter
    .parameter "oContext"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/glympse/android/glympse/DlgSettings$Setting;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 430
    .local p3, listSettings:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/glympse/android/glympse/DlgSettings$Setting;>;"
    iput-object p1, p0, Lcom/glympse/android/glympse/DlgSettings$SettingAdapter;->this$0:Lcom/glympse/android/glympse/DlgSettings;

    .line 429
    const/4 v0, 0x0

    invoke-direct {p0, p2, v0, p3}, Landroid/widget/ArrayAdapter;-><init>(Landroid/content/Context;ILjava/util/List;)V

    return-void
.end method


# virtual methods
.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 8
    .parameter "nPosition"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    const/4 v7, 0x3

    const/4 v6, 0x2

    const/4 v5, 0x1

    .line 435
    invoke-virtual {p0, p1}, Lcom/glympse/android/glympse/DlgSettings$SettingAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/glympse/android/glympse/DlgSettings$Setting;

    .line 437
    .local v2, oSetting:Lcom/glympse/android/glympse/DlgSettings$Setting;
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgSettings$SettingAdapter;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    .line 439
    .local v0, inflater:Landroid/view/LayoutInflater;
    if-eqz p1, :cond_0

    if-eq v6, p1, :cond_0

    if-ne v7, p1, :cond_2

    .line 440
    :cond_0
    const v3, 0x7f030021

    :goto_0
    const/4 v4, 0x0

    .line 438
    invoke-virtual {v0, v3, p3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v3

    iput-object v3, v2, Lcom/glympse/android/glympse/DlgSettings$Setting;->m_oView:Landroid/view/View;

    .line 443
    iget-object v3, v2, Lcom/glympse/android/glympse/DlgSettings$Setting;->m_oView:Landroid/view/View;

    const v4, 0x7f0c007b

    invoke-virtual {v3, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    .line 447
    .local v1, oImageView:Landroid/widget/ImageView;
    if-ne v5, p1, :cond_3

    .line 449
    const/high16 v3, -0x100

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setBackgroundColor(I)V

    .line 450
    invoke-virtual {v1, v5, v5, v5, v5}, Landroid/widget/ImageView;->setPadding(IIII)V

    .line 451
    iget-object v3, p0, Lcom/glympse/android/glympse/DlgSettings$SettingAdapter;->this$0:Lcom/glympse/android/glympse/DlgSettings;

    invoke-virtual {v3}, Lcom/glympse/android/glympse/DlgSettings;->SetAvatarIcon()V

    .line 482
    :cond_1
    :goto_1
    iget-object v3, v2, Lcom/glympse/android/glympse/DlgSettings$Setting;->m_oView:Landroid/view/View;

    return-object v3

    .line 440
    .end local v1           #oImageView:Landroid/widget/ImageView;
    :cond_2
    const v3, 0x7f030022

    goto :goto_0

    .line 457
    .restart local v1       #oImageView:Landroid/widget/ImageView;
    :cond_3
    iget v3, v2, Lcom/glympse/android/glympse/DlgSettings$Setting;->m_nImage:I

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 460
    if-nez p1, :cond_4

    .line 462
    iget-object v3, p0, Lcom/glympse/android/glympse/DlgSettings$SettingAdapter;->this$0:Lcom/glympse/android/glympse/DlgSettings;

    invoke-virtual {v3}, Lcom/glympse/android/glympse/DlgSettings;->SetNickname()V

    goto :goto_1

    .line 468
    :cond_4
    iget-object v3, v2, Lcom/glympse/android/glympse/DlgSettings$Setting;->m_oView:Landroid/view/View;

    const v4, 0x7f0c006f

    invoke-virtual {v3, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iget-object v4, v2, Lcom/glympse/android/glympse/DlgSettings$Setting;->m_strName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 471
    if-ne v6, p1, :cond_5

    .line 473
    iget-object v3, p0, Lcom/glympse/android/glympse/DlgSettings$SettingAdapter;->this$0:Lcom/glympse/android/glympse/DlgSettings;

    invoke-virtual {v3}, Lcom/glympse/android/glympse/DlgSettings;->SetTwitter()V

    goto :goto_1

    .line 475
    :cond_5
    if-ne v7, p1, :cond_1

    .line 477
    iget-object v3, p0, Lcom/glympse/android/glympse/DlgSettings$SettingAdapter;->this$0:Lcom/glympse/android/glympse/DlgSettings;

    invoke-virtual {v3}, Lcom/glympse/android/glympse/DlgSettings;->SetFacebook()V

    goto :goto_1
.end method
